/*
 * Copyright (c) 2006-2021, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2021-12-06     MBW       the first version
 */
#ifndef APPLICATIONS_SENSOR_PRO_DATA_DEFINE_H_
#define APPLICATIONS_SENSOR_PRO_DATA_DEFINE_H_
#include "sys.h"

#define max_power 2000
#define min_power 1000
#define max_pitch 400
#define min_pitch -400
#define max_height 500
#define min_height -500

#define con_task_prio 5
#define sen_task_prio 5
#define us016_task_prio 6
#define sbus_task_prio 7
#define height_task_prio 8
#define niming_task_prio 16

#define PI 3.1415926f
typedef struct
{
    //PID控制的传感器输入
    F_XYZ get_aac;
    F_XYZ get_gyro;
    F_XYZ get_angel;
    F_XYZ get_position;
    F_XYZ get_vel;
    //PID控制的设定值
    F_XYZ set_angel;
    F_XYZ set_position;
    F_XYZ set_vel;
    //PID控制的输入限幅值
    F_XYZ limit_vel_up,limit_vel_down;
    //PID控制器的输出
    float pitch,roll,yaw,height,thrust,basethrust;
    //一键定高的参数
    float velz2;
    float T,W,A,cnt;
    float A_H,height_set;
    //电池电压
    float batter_vol;
    //
    u8 motor_power;
    //
    u8 data_show;
}res_data;

typedef struct
{
    //PID控制的传感器输入
    float con_time,senor_time,niming_time,main_time;
    float us016_time,ppm_time,height_time,sbus_time;

}time_data;

extern time_data task_time1;
extern res_data control_data;
#endif /* APPLICATIONS_SENSOR_PRO_DATA_DEFINE_H_ */
